package com.kedi.usercenter.exception;


import com.kedi.usercenter.enums.ResultEnum;

/**
* @Description:    自定义异常类
* @Author:         ytw
* @CreateDate:     2019/7/29 23:22
* @UpdateRemark:   修改内容
* @Version:        1.0
*/
public class CommonException extends RuntimeException {
    private Integer code;
    public CommonException(Integer code,String msg){
        super(msg);
        this.code=code;
    }

    public CommonException(ResultEnum resultEnum){
        super(resultEnum.getMsg());
        this.code=resultEnum.getCode();
    }
}
